
class BaseEntity<T extends dynamic>{

  @override
  String toString() {
    return 'BaseEntity{code: $code, msg: $msg, data: $data}';
  }
  dynamic code;
  dynamic msg;
  T? data;

  BaseEntity({this.code, this.msg, this.data});

  BaseEntity.fromJson(Map<String, dynamic> json) {
    code = json['code'];
    msg = json['msg'];
    data = json['data'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['code'] = this.code;
    data['msg'] = this.msg;
    data['data'] = this.data;
    return data;
  }
}